import { defineConfig } from 'vite'
// 引入svg插件
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    createSvgIconsPlugin({
      // Specify the icon folder to be cached
      iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
      // Specify symbolId format
      symbolId: 'icon-[dir]-[name]',
    }),
  ],

  server: {
    host: '0.0.0.0',
    port: 9000,
    // 是否开启 https
    https: false,
  },
  resolve: {
    alias: {
      '@': path.resolve('./src'),
    },
  },
})
